<!--组件-策略类型-->
<template>
  <div class="type">
    <text class="font28 text2">{{T('策略类型')}}</text>
    
    <div class="select">
      <div v-for="(item, index) in tagList" v-bind:key="index"  @click="tagClick(index)">

        <div :class="['but', tag == index ? 'main1' : 'bg2']" > 
          <text :class="['font28' , tag == index ? 'text1' : 'text2']">{{T(item.bannerName)}}</text>
        </div>
      </div>
    </div>
  </div>
</template>

<script>

import I18N from "@/_i18n/i18n";
var T = I18N.t;

export default {

  model:{
    prop:"tag",
    event:"change",
  },

  props:{

    tag:Number, //当前选中

    tagList: Object, //策略类型
  },

  data() {
    return {
      T:T,
    };
  },

  mounted(){
  },


  methods:{

    //策略类型
    tagClick(index){
      this.$emit("change", index);
    },
  }
}
</script>



<style src="@/_css/style.css"></style>
<style scoped>
.type {
  flex-direction: column;
}
.select {
  flex-direction: row;
  justify-content: space-between;
}
.but {
  flex-direction: row;
  justify-content: center;
  align-items: center;

  width: 200px;
  height: 76px;
  border-radius: 16px;

  margin-top: 20px;
}
</style>
